usb, composite: after unregister gadget driver set composite to NULL
authorHeiko Schocher <[email protected]>
Tue, 4 Jun 2013 09:21:32 +0000 (11:21 +0200)
committerMarek Vasut <[email protected]>
Wed, 12 Jun 2013 20:22:52 +0000 (22:22 +0200)
Without this, second usb_composite_register() call fails always
with -EINVAL.

Signed-off-by: Heiko Schocher <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Marek Vasut <[email protected]>
drivers/usb/gadget/composite.c

index 2c5600ed5210c9da2e2450132d11d1c65a41578e..f30778a163b2950b2681a5ea9b610a7d74d10fb3 100644 (file)
@@ -1098,4 +1098,5 @@ void usb_composite_unregister(struct usb_composite_driver *driver)
        if (composite != driver)
                return;
        usb_gadget_unregister_driver(&composite_driver);
+       composite = NULL;
 }